<html>
<head><meta charset="utf-8"><title>Picking up issue  #77880 · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html">Picking up issue  #77880</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213532852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213532852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213532852">(Oct 16 2020 at 08:38)</a>:</h4>
<p>Hello, I was looking to get started on issue  <a href="https://github.com/rust-lang/rust/issues/77880">#77880</a> (I see it's tagged <code>E-mentor</code>).</p>



<a name="213533242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213533242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213533242">(Oct 16 2020 at 08:42)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="239881">@Josh Triplett</span></p>



<a name="213533469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213533469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213533469">(Oct 16 2020 at 08:45)</a>:</h4>
<p><span class="user-mention" data-user-id="256313">@Hameer Abbasi</span> <span class="user-mention" data-user-id="116883">@tmandry</span> tagged it as <code>E-mentor</code>, so they'd be the best person to talk to. I just filed the issue. :)</p>



<a name="213533521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213533521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213533521">(Oct 16 2020 at 08:45)</a>:</h4>
<p>Sorry for the ping, will keep that in mind in the future.</p>



<a name="213537783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213537783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213537783">(Oct 16 2020 at 09:31)</a>:</h4>
<p>No need to be sorry, happy to help. :)</p>



<a name="213579429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213579429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213579429">(Oct 16 2020 at 16:00)</a>:</h4>
<p><span class="user-mention" data-user-id="256313">@Hameer Abbasi</span> Great to hear!</p>
<p>The comment I posted was my rough description of how to get started. It looks like <a href="https://github.com/rust-lang/rust/blob/8850893d96252172700727fe9e746c8e1ebd5853/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs#L358">this function</a> is the one where handling needs to be added for async blocks. Those will show up as <code>ty::Generator</code> instead of <code>ty::Closure</code>. We may also want to check that they actually come from an async lowering by checking the <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Body.html#method.generator_kind"><code>generator_kind</code></a> on the body.</p>
<p><a href="https://github.com/rust-lang/rust/blob/8850893d96252172700727fe9e746c8e1ebd5853/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs#L1513">This code</a> might be helpful as an example of async/await specific diagnostics.</p>
<p>Feel free to ask questions here.</p>



<a name="213649229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213649229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213649229">(Oct 17 2020 at 12:16)</a>:</h4>
<p>Hi! To start some exploration of how to go about this, I compiled the compiler with debug info on (yes, I know it generates GB worth of data, I'm okay with that). The function you specified is indeed hit when constructing the error. The only thing within that function which is matched against <code>ty::Closure</code> is <code>local_visitor.found_node_ty</code>, and I found that that's an option set to <code>None</code> when running the compiler on the code in the issue. Of course, I may be missing something, but perhaps there's a <code>ty::Generator</code> in another variable I'm not aware of?</p>



<a name="213866827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213866827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213866827">(Oct 20 2020 at 01:28)</a>:</h4>
<p>hmm, I'd have to take another look at that visitor and try to figure out what it's doing</p>



<a name="213880152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Picking%20up%20issue%20%20%2377880/near/213880152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Picking.20up.20issue.20.20.2377880.html#213880152">(Oct 20 2020 at 06:46)</a>:</h4>
<p>Please ping me if there’s more information that may help me fix this.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>